Optimal. Leaf size=42 \[ -\frac{1}{2} \text{Si}\left (\frac{x}{2}\right ) \sec \left (\frac{x}{2}\right ) \sqrt{a \cos (x)+a}-\frac{\sqrt{a \cos (x)+a}}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0906291, antiderivative size = 42, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {3319, 3297, 3299} \[ -\frac{1}{2} \text{Si}\left (\frac{x}{2}\right ) \sec \left (\frac{x}{2}\right ) \sqrt{a \cos (x)+a}-\frac{\sqrt{a \cos (x)+a}}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3319
Rule 3297
Rule 3299
Rubi steps
\begin{align*} \int \frac{\sqrt{a+a \cos (x)}}{x^2} \, dx &=\left (\sqrt{a+a \cos (x)} \sec \left (\frac{x}{2}\right )\right ) \int \frac{\cos \left (\frac{x}{2}\right )}{x^2} \, dx\\ &=-\frac{\sqrt{a+a \cos (x)}}{x}-\frac{1}{2} \left (\sqrt{a+a \cos (x)} \sec \left (\frac{x}{2}\right )\right ) \int \frac{\sin \left (\frac{x}{2}\right )}{x} \, dx\\ &=-\frac{\sqrt{a+a \cos (x)}}{x}-\frac{1}{2} \sqrt{a+a \cos (x)} \sec \left (\frac{x}{2}\right ) \text{Si}\left (\frac{x}{2}\right )\\ \end{align*}
Mathematica [A] time = 0.057508, size = 33, normalized size = 0.79 \[ -\frac{\sqrt{a (\cos (x)+1)} \left (x \text{Si}\left (\frac{x}{2}\right ) \sec \left (\frac{x}{2}\right )+2\right )}{2 x} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.149, size = 0, normalized size = 0. \begin{align*} \int{\frac{1}{{x}^{2}}\sqrt{a+a\cos \left ( x \right ) }}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] time = 2.18569, size = 31, normalized size = 0.74 \begin{align*} -\frac{1}{4} \, \sqrt{2} \sqrt{a}{\left (i \, \Gamma \left (-1, \frac{1}{2} i \, x\right ) - i \, \Gamma \left (-1, -\frac{1}{2} i \, x\right )\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: UnboundLocalError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{a \left (\cos{\left (x \right )} + 1\right )}}{x^{2}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{a \cos \left (x\right ) + a}}{x^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]